
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ page import="java.io.* ,java.util.*, java.sql.*, Login.*"%>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>:: Shanti Chakra Foundation ::</title>
<link href="style.css" rel="stylesheet" type="text/css">

</head>
<script>
  function validate(form1)
  {  
		var count = 0;
		var length = document.form1.rcheck.length ;
		for (i = 0 ; i < length ; i++)
		{ 
		if (document.form1.rcheck[i].checked == false)
		count = count + 1 ;
		
		if(count == length)
		{
			alert("Select any Record");
			document.getElementById("rcheck").focus;
			return false;
		}
	    }
  }
</script>

<body>
<% 
HttpSession hs = request.getSession(true);
String id = (String) hs.getAttribute("memid");
%>
<p align="left"> Welcome : <%=id%><a href="AdminAccount.jsp"> Back</a>
  <%
MySqlConnector ms = new MySqlConnector();
PreparedStatement stmt1;
ResultSet rs1 ;
ms.Connect();
// All members
String q = "SELECT memberid , name, surname, sex, mobile, email  FROM registration where memberid  <> 'SCFAdmin';" ;
stmt1 = ms.Connect().prepareStatement(q);
rs1 = stmt1.executeQuery();
%>
</p>
<form name="form1" method="post" action = "ViewMember" onSubmit="return validate(this.name)">
  
   <DIV id="darkbanner" class="banner320">
						  <H2>Members of SCF </H2>
  </DIV>
 
<table width="100%" border="1" align="left"   bordercolor="#FFFF99" class="greenlink_no_left_padding">
       <tr>
         <td colspan="6" >
		 <input name="EditMem" type="submit" class="bluetext" id = "EditMem" value="Edit Member" >
		 <input name="ViewMem" type="submit" class="bluetext" id ="ViewMem" value="View Member" >
         <input name="DeleteMem" type="submit" class="bluetext"  id ="DeleteMem" value="Delete Member" ></td>
       </tr>
       <tr>
      <td width="45" class="redtext"></td>
      <td class="redtext">Member ID </td>
      <td class="redtext">Full Name </td>
      <td class="redtext">Gender</td>
      <td class="redtext">Mobile</td>
      <td class="redtext">Mail ID</td>
    </tr>
    <% while(rs1.next()==true)
	{  %>
    <tr>
      <td class="greentext" ><input name="rcheck" type="radio" class="greentext " id="rcheck" value="<%=rs1.getString(1)%>">	  </td>
      <td width="117" class="boldtext"><%=rs1.getString(1)%></td>
      <td width="225" class="boldtext"><%=rs1.getString(2)%>.<%=rs1.getString(3)%></td>
      <td width="114" class="boldtext"><%=rs1.getString(4)%></td>
      <td width="171" class="boldtext"><%=rs1.getString(5)%></td>
      <td width="128" class="boldtext"><%=rs1.getString(6)%></td>
    </tr>
    <%}%>
  </table>
  <p>&nbsp;</p>
<p>&nbsp;</p>
</form>
</body>
</html>